#define _CRT_SECURE_NO_WARNINGS 1


#include<iostream>

using namespace std;

int main()
{
	int a = 0, b = 0;
	cin >> a >> b;
	cout << (a / b) << ' ' << (a % b) << endl;

	return 0;
}